using System;
using System.Drawing;
using System.Drawing.Imaging;
public sealed class ExtendCollection2
{
	private struct Struct1
	{
		public byte byte_0;
		public byte byte_1;
		public byte byte_2;
		public byte byte_3;
		public override string ToString()
		{
			return string.Concat(new string[]
			{
				"(",
				this.byte_3.ToString(),
				", ",
				this.byte_2.ToString(),
				", ",
				this.byte_1.ToString(),
				", ",
				this.byte_0.ToString(),
				")"
			});
		}
	}
	private System.Drawing.Bitmap bitmap_0;
	private int int_0;
	private System.Drawing.Imaging.BitmapData bitmapData_0;
	private unsafe byte* pByte_0 = null;
	private unsafe ExtendCollection2.Struct1* pStruct1_0 = null;
	public ExtendCollection2(System.Drawing.Bitmap bitmap_1)
	{
		this.bitmap_0 = bitmap_1;
	}
	public unsafe void method_0()
	{
		try
		{
			System.Drawing.Rectangle rect = new System.Drawing.Rectangle(System.Drawing.Point.Empty, this.bitmap_0.Size);
			this.int_0 = rect.Width * sizeof(ExtendCollection2.Struct1);
			if (this.int_0 % 4 != 0)
			{
				this.int_0 = 4 * (this.int_0 / 4 + 1);
			}
			this.bitmapData_0 = this.bitmap_0.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
			this.pByte_0 = (byte*)this.bitmapData_0.Scan0.ToPointer();
		}
		catch
		{
		}
	}
	public unsafe System.Drawing.Color method_1(int int_1, int int_2)
	{
        try
        {
            this.pStruct1_0 = (Struct1*)((this.pByte_0 + (int_2 * this.int_0)) + (int_1 * sizeof(Struct1)));
            return Color.FromArgb(this.pStruct1_0->byte_3, this.pStruct1_0->byte_2, this.pStruct1_0->byte_1, this.pStruct1_0->byte_0);
        }
        catch
        {
            return Color.Red;
        }
	}
	public unsafe System.Drawing.Color method_2()
	{
        try
        {
            this.pStruct1_0++;
            return Color.FromArgb(this.pStruct1_0->byte_3, this.pStruct1_0->byte_2, this.pStruct1_0->byte_1, this.pStruct1_0->byte_0);
        }
        catch
        {
            return Color.Red;
        }
	}
	public unsafe void method_3(int int_1, int int_2, System.Drawing.Color color_0)
	{
        try
        {
            Struct1* structPtr = (Struct1*)((this.pByte_0 + (int_2 * this.int_0)) + (int_1 * sizeof(Struct1)));
            structPtr->byte_3 = color_0.A;
            structPtr->byte_2 = color_0.R;
            structPtr->byte_1 = color_0.G;
            structPtr->byte_0 = color_0.B;
        }
        catch
        {
        }
	}
	public unsafe void method_4()
	{
		try
		{
			this.bitmap_0.UnlockBits(this.bitmapData_0);
			this.bitmapData_0 = null;
			this.pByte_0 = null;
		}
		catch
		{
		}
	}
}
